﻿<%@ control language="C#" autoeventwireup="true" inherits="UserControls_ThongKe, App_Web_nauw1oz5" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="Scripts/jquery.dynDateTime.min.js" type="text/javascript"></script>
<script src="Scripts/calendar-en.min.js" type="text/javascript"></script>
<link href="Styles/calendar-blue.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
    $(document).ready(function () {
        $("#<%=TextBox1.ClientID %>").dynDateTime({
            showsTime: true,
            ifFormat: "%Y/%m/%d %H:%M",
            daFormat: "%l;%M %p, %e %m, %Y",
            align: "Br",
            electric: false,
            singleClick: true,
            displayArea: null,
            button: null
        });
    });
</script>
<script type="text/javascript">
    $(document).ready(function () {
        $("#<%=TextBox2.ClientID %>").dynDateTime({
                     showsTime: true,
                     ifFormat: "%Y/%m/%d %H:%M",
                     daFormat: "%l;%M %p, %e %m, %Y",
                     align: "Br",
                     electric: false,
                     singleClick: true,
                     displayArea: null,
                     button: null
                 });
             });
</script>

<form id="form2" runat="server">




    Chọn khoảng thời gian:<br />
    Từ:
     <asp:TextBox ID="TextBox1" runat="server"  EnableViewState= "false" ReadOnly = "true"></asp:TextBox> Đến:  <asp:TextBox ID="TextBox2" runat="server"  EnableViewState= "false" ReadOnly = "true"></asp:TextBox>
 Chọn mã người dùng:
    <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="ObjectDataSource1" DataTextField="TenND" DataValueField="MaND">
    </asp:DropDownList>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="getNguoiDung" TypeName="_CSDL"></asp:ObjectDataSource>
    <asp:Button ID="Button1" runat="server" Text="Xem" OnClick="Button1_Click1" />
    <br />
    <asp:Label ID="Label1" runat="server"></asp:Label>
    <br />
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" EnableModelValidation="True">
        <Columns>
            <asp:BoundField DataField="MaND" HeaderText="MaND" SortExpression="MaND" />
            <asp:BoundField DataField="MaSV" HeaderText="MaSV" SortExpression="MaSV" />
            <asp:BoundField DataField="SDT" HeaderText="SDT" SortExpression="SDT" />
            <asp:BoundField DataField="NoiDung" HeaderText="NoiDung" SortExpression="NoiDung" />
            <asp:BoundField DataField="NgayGio" HeaderText="NgayGio" SortExpression="NgayGio" />
        </Columns>
    </asp:GridView>


    <asp:SqlDataSource ID="DSThongKeTongHop" runat="server" ConnectionString="<%$ ConnectionStrings:SMSWebConnectionString %>" SelectCommand="SELECT [MaND], [MaSV], [SDT], [NoiDung], [NgayGio] FROM [TinGui] WHERE (([NgayGio] &lt;= @NgayGio2) AND ([NgayGio] &gt;= @NgayGio)) ORDER BY [id]">
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBox2" Name="NgayGio2" PropertyName="Text" Type="DateTime" />
            <asp:ControlParameter ControlID="TextBox1" Name="NgayGio" PropertyName="Text" Type="DateTime" />
        </SelectParameters>
    </asp:SqlDataSource>


</form>